package org.ccunix.eshop.service.impl;

import org.ccunix.eshop.dao.OrdersDao;
import org.ccunix.eshop.domain.dto.OrdersVO;
import org.ccunix.eshop.service.OrdersServiceIface;

import java.util.List;

public class OrdersServiceImpl implements OrdersServiceIface {
        OrdersDao ordersDao = new OrdersDao();
    @Override
    public OrdersVO getOrderByOrderNo(String orderNo) {
        return ordersDao.selectOrderByOrderNo(orderNo);
    }

    @Override
    public List<OrdersVO> getOrdersListByMid(Integer member) {
        return ordersDao.selectOrdersListByMid(member);
    }

    @Override
    public boolean deleteOrdersById(String id) {
        int int_id = Integer.parseInt(id);
        return ordersDao.deleteOrdersById(int_id);
    }

    @Override
    public OrdersVO getOrderById(String id) {
        int int_id = Integer.parseInt(id);
        return ordersDao.selectOrdersById(int_id);
    }
}
